﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 设计模式.状态模式
{
    public class StatePatternDemo
    {
        public static void Test()
        {
            Context context = new Context();

            StartState startState = new StartState();
            startState.DoAction(context);

            Console.WriteLine(context.State.ToString());

            StopState stopState = new StopState();
            stopState.DoAction(context);

            Console.WriteLine(context.State.ToString());
        }
    }
}
